l = [1,2,3,4,5,6,7]

for i in range(len(l)):
    if i > len(l)-1-i:
        break
    x = l[i]
    l[i] = l[len(l)-1-i]
    l[len(l)-1 - i] = x
print(l)
